<div class="box box-maxbid">
	<div class="box-header">
		<h3 class="box-title">Banners Cadastro / Edi&ccedil;&atilde;o</h3>
	</div>
	<!-- /.box-header -->
	<!-- form start -->

	<div class="overlay" ng-show="hideform"></div>
	<div class="loading-img" ng-show="hideform"></div>

	<form role="form" name="BannerForm">
		<div class="box-body">
			<div class="form-group row">
				
				<div class="col-md-5 col-xs-12">
					<label for="InputTipo">Descrição</label> <input
						ng-model="banner.TITLE" name="TITLE" required
						class="form-control" />
					<div class="messages-alert"
						ng-show="BannerForm.TITLE.$dirty && BannerForm.TITLE.$invalid">
						<span ng-show="BannerForm.TITLE.$error.required">* Campo
							requerido</span>
					</div>
				</div>
				<div class="col-md-7 col-xs-12">
					<label for="InputTipo">Link</label> <input
						ng-model="banner.LINK" name="LINK" required
						class="form-control" />
					<div class="messages-alert"
						ng-show="BannerForm.LINK.$dirty && BannerForm.LINK.$invalid">
						<span ng-show="BannerForm.LINK.$error.required">* Campo requerido</span>
					</div>
				</div>
				
			</div>
			
			<div class="form-group row">
			   <div class="col-lg-8 col-lg-offset-2 col-xs-12 col-md-8 col-md-offset-2" ng-show="files.length">
					<div class="small-box bg-gray image-leilao">
						<div class="inner box-inner-image-leilao">
							<input type="hidden" ng-model="banner.IMAGE" name="IMAGE" value="{{files[0].name}}" /> <img
								class=""
								ng-src="<?php echo web_dir(); ?>images/banners/{{files[0].name}}"
								width="100%" /> <a href="javascript:void(0)"
								title="remover imagem"
								class="btn delete-image-leilao btn-danger btn-sm"
								ng-click="onDeleteImageBanner(files[0].name)"><i
								class="fa fa-trash-o"></i></a>
						</div>
					</div>
				</div>
			</div>
			
		</div>
		<!-- /.box-body -->

		<div class="box-footer">
			<button type="submit" ng-click="save()"
				ng-disabled="BannerForm.$invalid" class="btn btn-primary">Salvar</button>
			<button type="submit" ng-click="save('/banners')"
				ng-disabled="BannerForm.$invalid" class="btn btn-primary">Salvar e
				Listar</button>
			<a href="#/banners"
				class="btn btn-danger"><i class="fa fa-ban"></i> Cancelar</a>	
				
				<coc-file-upload
						auto-upload='true'
						button-label-file='Selecionar Banner'
						button-label-send="Processar"
						on-progress='sellerProgress(percentDone)'
						on-done ='onComplete(files,data,obj)'
						on-get-data-extra="getAddData()"
						on-error="showError(files,type,msg)"
						url-upload='<?php echo site_url('/api/fileBanner'); ?>'
						/>
				
			<!-- 
			<a href="#/banners" class="btn btn-danger">Listar</a> <span
				class="separator"></span> <a ng-disabled="BannerForm.$invalid" href="javascript:void(0)"
				ng-click="triggerButton()" class="btn btn-info"><i
				class="fa fa-picture-o"></i> Upload Logo</a> -->
			<div class="row">
				<div ng-show="startProgressBar" class="col-xs-12"
					style="margin-top: 10px;">
					<div class="progress xs banner-progress-bar">
						<div class="progress-bar progress-bar-light-blue"
							style="width: {{progress"></div>
					</div>
				</div>
				<upload-button action="/api/fileBanner" 
					complete="uploadedBanner($data, $status)"></upload-button>
			</div>
		</div>
	</form>
</div>
<!-- /.box -->

